Skip to main content

beep

Type

command

Summary

Sounds the system beep.

Syntax

beep [<numberOfTimes>]

Description

Use the beep command to get the user's attention.

If the numberOfTimes is less than 1, the beep command has no effect (but does not cause a script error).

Cross-platform note

Windows and OS X do not execute the beep command if it's issued while a beep is playing. This means that if you specify a numberOfTimes on a Windows or OS X system, the user might hear fewer beeps because not all of them are sent to the speaker. To ensure that the user hears a specific number of beeps, use a loop with a wait command (where the wait time is at least as long as the beep sound's duration) after each beep:

note

Overuse of the beep command has been known to cause user stress.

note

The iPhone has no default system alert sound so if a sound is required one must be specified using the beepSound property. The action of beep is controlled by the system and depends on the user's preference settings. In particular a beep will only cause a vibration if the user has enabled that feature. Similarly, a beep will only cause a sound if the phone is not in silent mode.

note

Android tries to use the default NOTIFICATION sound or uses the RINGTONE sound, if the NOTIFICATION sound is not available.

Parameters

NameTypeDescription

numberOfTimes

integer

An integer (or an expression that evaluates to an integer) and specifies how many beeps are sounded. If the numberOfTimes is not specified, one beep is sounded.

Examples

beep
beep 7
beep trunc(field "Severity Level")

command: wait, play

glossary: Windows, loop, error, execute, OS X

property: beepSound, beepDuration, beepLoudness, beepPitch, playLoudness

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

mobile

Thank you for your feedback!

Was this page helpful?